package domain;

import utils.LoadBufferedImage;

import java.awt.*;
import java.awt.image.BufferedImage;

import static utils.Constants.poleImgPath;

public class Pole {
    private int poleLength=300;
    private BufferedImage poleImg;
    public Pole(int poleLength) {
        this.poleLength=poleLength;
        this.poleImg= LoadBufferedImage.loadBufferedImage(poleImgPath);
    }

    public int getPoleLength() {
        return poleLength;
    }

    /**
     * 绘制柱子
     * @param graphics
     */
    public void drawPole(Graphics graphics){
        graphics.setColor(new Color(124,234,142));
        graphics.fillRect(0,0,750,420);
        graphics.drawImage(poleImg, 115,200,poleLength+10,20,null);
    }
}
